package apt.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

import apt.bean.ProducerBean;
import apt.dao.ProducerDao;

public class ProducerAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private ProducerBean producerBean;
	private ProducerDao producerDao;
	private List<ProducerBean> listProducer;
	
	public ProducerAction() {
		producerDao = new ProducerDao();
	}
	
	public String getAllProducer()
	{
		try {
			listProducer = producerDao.getListProcer();
		} catch (Exception e) {
			return ERROR; 
		}
		return SUCCESS;
	}

	public ProducerBean getProducerBean() {
		return producerBean;
	}

	public void setProducerBean(ProducerBean producerBean) {
		this.producerBean = producerBean;
	}

	public ProducerDao getProducerDao() {
		return producerDao;
	}

	public void setProducerDao(ProducerDao producerDao) {
		this.producerDao = producerDao;
	}

	public List<ProducerBean> getListProducer() {
		return listProducer;
	}

	public void setListProducer(List<ProducerBean> listProducer) {
		this.listProducer = listProducer;
	}
	
	
}
